      SUBROUTINE SETUP
      RETURN
      END
C   HS83
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),FX
      ICF=ICF+1
      FX=5.3578547D0*X(3)**2 + .8356891D0*X(1)*X(5)+37.293239D0*X(1)
     1   -40792.141D0
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),GRADF(NX)
      ICGF=ICGF+1
      GRADF(1)=37.293239D0 +.8356891D0*X(5)
      GRADF(2)= 0. D0
      GRADF(3)=2.D0 *5.3578547D0*X(3)
      GRADF(4)= 0. D0
      GRADF(5)=  .8356891D0* X(1)
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),HXI
      CRES(I)=CRES(I)+1
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GRADHI(NX)
      CGRES(I)=CGRES(I)+1
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J
      DOUBLE PRECISION X(NX),GXI,Y
      IF ( GUNIT(1,I+NH) .EQ. -1 )CRES(I+NH)=CRES(I+NH)+1      
      J=I-(I/2)*2
      GOTO(10,10,20,20,30,30,40,40,50,50,60,60,70,70,80,80),I
 10   CONTINUE
      Y=85.334407D0 + 5.6858D-3*X(2)*X(5) + 6.262D-4*X(1)*X(4)
     1   -2.2053D-3*X(3)*X(5)
      IF(J .EQ. 0)      Y=92.D0-Y
      GOTO 90
 20   CONTINUE
      Y=80.51249D0 + 7.1317D-3 * X(2) *X(5) + 2.9955D-3*X(1)*X(2)
     1   +2.1813D-3*X(3)**2-90.D0
      IF(J .EQ. 0)     Y=20.D0-Y
        GOTO 90
 30   CONTINUE
      Y=9.300961D0 + 4.7026D-3*X(3)*X(5) + 1.2547D-3*X(1)*X(3)+
     1   1.9085D-3*X(3)*X(4)-20.D0
      IF(J .EQ. 0)      Y=5.D0-Y
      GOTO 90
 40   CONTINUE
      Y=X(1)-78.D0
      IF(J .EQ. 0)     Y=24.D0-Y
      GOTO 90
 50   CONTINUE
      Y=X(2)-33.D0
      IF(J .EQ. 0)     Y=12.D0-Y
      GOTO 90
 60   CONTINUE
      Y=X(3)-27.D0
      IF(J .EQ. 0)     Y=18.D0-Y
      GOTO 90
 70   CONTINUE
      Y=X(4)-27.D0
      IF(J .EQ. 0)     Y=18.D0-Y
      GOTO 90
 80   CONTINUE
      Y=X(5)-27.D0
      IF(J .EQ. 0)     Y=18.D0-Y
 90   CONTINUE
      GXI=Y
      RETURN
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J,K
      DOUBLE PRECISION X(NX) ,GRADGI(NX)
      IF ( GUNIT(1,I+NH) .EQ. 1 )RETURN
      CGRES(I+NH)=CGRES(I+NH)+1
      J=I-(I/2)*2
      GOTO(10,10,20,20,30,30),I
   10 CONTINUE
      GRADGI(1)=6.262D-4*X(4)
      GRADGI(2)=5.6858D-3*X(5)
      GRADGI(3)=-2.2053D-3*X(5)
      GRADGI(4)=6.262D-4*X(1)
      GRADGI(5)=5.6858D-3*X(2)-2.2053D-3*X(3)
      GOTO 60
   20 CONTINUE
      GRADGI(1)=2.9955D-3*X(2)
      GRADGI(2)=2.9955D-3*X(1)+7.1317D-3*X(5)
      GRADGI(3)=2.D0*2.1813D-3*X(3)
      GRADGI(4)=0.D0
      GRADGI(5)=7.1317D-3*X(2)
      GOTO 60
   30 CONTINUE
      GRADGI(1)=1.2547D-3*X(3)
      GRADGI(2)=0.D0
      GRADGI(3)=1.2547D-3*X(1)+1.9085D-3*X(4)+4.7026D-3*X(5)
      GRADGI(4)=1.9085D-3*X(3)
      GRADGI(5)=4.7026D-3*X(3)
      GOTO 60
   60 CONTINUE
      IF(J .NE. 0)      RETURN
      DO      80      K=1,5
      GRADGI(K)=-GRADGI(K)
   80 CONTINUE
      RETURN
      END
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I,J
      DATA NAME/'HS83'/
      DATA (X(I),I=1,5)/78.000D0,33.00D0,3*27.D0/
      DATA N/5/ , NH/0/ , NG/16/
      DATA DEL0/1.00D0/ ,TAU0/1.00D0/ ,TAU/.1D0/
      DATA ((GUNIT(I,J),I=1,3),J=0,16)
     F           /-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,
     F           -1,0,0,1,1,1,1,1,-1,1,2,1,1,2,-1,1,3,1,1,3,-1,1,4,1,
     F           1,4,-1,1,5,1,1,5,-1/
      END

